<template>
  
      <tr>
          <td>
              <input type="checkbox" v-model="obj.checked" >
          </td>
          <td>{{obj.name}}</td>
          <td>{{obj.price}}</td>
          <td>
              <button @click="addFn(ind)">+</button>
              <span>{{obj.num}}</span>
              <button @click="delFn(ind)">-</button>
          </td>
          <td>{{obj.num * obj.price}}</td>
          <td>
              <button @click="deleteFn(ind)">删除</button>
          </td>
         
      </tr>
 
</template>

<script>
export default {
  props: ["obj","ind"],
  data () {
      return {
       checked:""
      }
  },
  methods: {
      addFn(ind){
          this.$emit("adds",ind)
      },
      delFn(ind){
          this.$emit("dels",ind)
      },
      deleteFn(ind){
          this.$emit("dFn",ind)
      }
  },
   
}
</script>

<style>

</style>